package javabase.schoolwork.day6_07;

/**
 * @author fance
 * @date 2018/6/7 20:15
 */
class ThreadName implements Runnable {
    @Override
    public void run() {
        for (int i = 0; i < 3; i++) {
                System.out.println(Thread.currentThread().getName() + " " + i);
        }
    }
}
public class ThreadNameDemo {
    public static void main(String[] args) {
        ThreadName my = new ThreadName();
        new Thread(my).start();
        new Thread(my,"A ").start();
        new Thread(my,"B ").start();
        new Thread(my).start();
        new Thread(my).start();
    }
}
